"""
__author__ = 'berlinyoung'
@File   :menu_cooperation_page.py
@Date   :2022/5/9 22:47
-*- coding: utf-8 -*-
"""
import time

from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions
from selenium.webdriver.support.wait import WebDriverWait

from weixin_web.step1.po.base import Base


class CooperationPage(Base):
    _base_url = "https://work.weixin.qq.com/wework_admin/frame#apps/qykit/proxy/exmail"

    ele_email_manage = (By.CSS_SELECTOR, ".weworktool_index_left_item:nth-child(3)")

    def goto_email_manage(self):
        r = self.driver.find_element(By.XPATH,'//div[@data-type="exmail"]/iframe[@class="js_qykit_frame"]')
        self.driver.switch_to.frame(r)
        self.find_and_click(self.ele_email_manage)

        from weixin_web.step1.po.email_manage_page import EmailManagePage
        return EmailManagePage(self.driver)






